﻿namespace Arms.Framework.Collections
{
    using System;
    using System.Collections;
    using System.Collections.Generic;

    /// <summary>
    /// Base contract for an add only collection.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IAddOnlyCollection<T> : IEnumerable<T>, IEnumerable
    {
        /// <summary>
        /// Number of items in this collection.
        /// </summary>
        int Count { get; }
        /// <summary>
        /// Adds an item to this collection.
        /// </summary>
        /// <param name="item">item to add</param>
        void Add(T item);
        /// <summary>
        /// Adds a distinct item to this collection.
        /// </summary>
        /// <param name="item">item to add</param>
        void AddDistinct(T item);
    }
}
